<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/11/22 0022
  Time: 下午 4:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改车辆信息</title>
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
    <style>
        .main:after{
            content: "";
            display: block;
            height: 0;
            clear:both;
            visibility: hidden;
        }
        .left{
            float: left;
            width:500px;
            margin-left: 200px;
            border:3px solid black;

            height: 750px;
            padding-left: 50px;
            padding-right: 50px;
        }
        .right{
            float: left;
            width:500px;
            padding-left: 50px;
            padding-right: 50px;
            border:3px solid black;
            height: 750px;
        }
        #submit{
            margin-left: 470px;
            margin-top: 50px;
        }
        .bottom{
            border:3px solid black;
            width: 1200px;
            margin: auto;
            margin-left: 200px;

        }
    </style>
</head>
<body>
<form class="layui-form" action="/xinxi/resave">
    <div class=main>
        <div class="left">
            <div class="layui-form-item">
                <label class="layui-form-label">车牌号码</label>
                <div class="layui-input-block">
                    <input type="text" name="carCode" required  lay-verify="required" placeholder="请输入车牌号码" autocomplete="off" class="layui-input" value="${xinxi.carCode}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">车辆颜色</label>
                <div class="layui-input-block">
                    <input type="hidden" name="carId" value="${xinxi.carId}">
                    <input type="text" name="carColor" required  lay-verify="required" placeholder="请输入车辆颜色" autocomplete="off" class="layui-input" value="${xinxi.carColor}">
                </div>
            </div>

                <div class="layui-form">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">购买日期</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" name="buyDate" id="test1" placeholder="yyyy-MM-dd" value="<fmt:formatDate value="${xinxi.buyDate}" pattern="yyyy-MM-dd"></fmt:formatDate>
">
                            </div>
                        </div>
                    </div>
                </div>
            <div class="layui-form-item">
                <label class="layui-form-label">发动机号</label>
                <div class="layui-input-block">
                    <input type="text" name="engineNum" required  lay-verify="required" placeholder="请输入发动机号" autocomplete="off" class="layui-input" value="${xinxi.engineNum}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">车架号码</label>
                <div class="layui-input-block">
                    <input type="text" name="frameNum" required  lay-verify="required" placeholder="请输入车架号码" autocomplete="off" class="layui-input" value="${xinxi.frameNum}">
                </div>
            </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">车辆类型</label>
                    <div class="layui-input-block">
                        <input type="text" name="carType" required  lay-verify="required" placeholder="请输入车辆类型" autocomplete="off" class="layui-input" value="${xinxi.carType}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">车辆品牌</label>
                    <div class="layui-input-block">
                        <input type="text" name="carBrand" required  lay-verify="required" placeholder="请输入车辆品牌" autocomplete="off" class="layui-input" value="${xinxi.carBrand}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">品牌型号</label>
                    <div class="layui-input-block">
                        <input type="text" name="carBrandType" required  lay-verify="required" placeholder="请输入品牌型号" autocomplete="off" class="layui-input" value="${xinxi.carBrandType}">
                    </div>
                </div>
                <%--<div class="layui-form-item">--%>
                    <%--<label class="layui-form-label">车辆图片</label>--%>
                    <%--<div class="layui-input-block">--%>
                        <%--<input type="text" name=""    placeholder="请输入维修地点" autocomplete="off" class="layui-input">--%>
                    <%--</div>--%>
                <%--</div>--%>
            <div class="layui-form-item aaa">
                <label class="layui-form-label">自动手动</label>
                <div class="layui-input-block">
                    <select name="isAuto" lay-filter="aihao">
                        <option value="0" <c:if test="${xinxi.isAuto==0}">selected</c:if>>手动</option>
                        <option value="1" <c:if test="${xinxi.isAuto==1}">selected</c:if>>自动</option>
                    </select>
                </div>
            </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">排量大小</label>
                    <div class="layui-input-block">
                        <input type="text" name="engineSize" required  lay-verify="required" placeholder="请输入排量大小" autocomplete="off" class="layui-input" value="${xinxi.engineSize}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">座位数量</label>
                    <div class="layui-input-block">
                        <input type="text" name="seatNum" required  lay-verify="required" placeholder="请输入座位数量" autocomplete="off" class="layui-input" value="${xinxi.seatNum}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">外观类型</label>
                    <div class="layui-input-block">
                        <input type="text" name="faceType" required  lay-verify="required" placeholder="请输入外观类型" autocomplete="off" class="layui-input" value="${xinxi.faceType}">
                    </div>
                </div>
            </div>

        <div class="right">
            <div class="layui-form-item">
                <label class="layui-form-label">当前里程数字</label>
                <div class="layui-input-block">
                    <input type="text" name="totalMile" required  lay-verify="required" placeholder="请输入当前里程" autocomplete="off" class="layui-input" value="${xinxi.totalMile}">
                </div>
            </div>

            <div class="layui-form-item aaa">
                <label class="layui-form-label">提醒手机号码 </label>

                <div class="layui-input-block">

                    <select name="ownerMobile" lay-filter="aihao">
                        <c:forEach items="${dept}" var="i">
                            <option value="${i.deptPhone}" <c:if test="${xinxi.ownerMobile eq i.deptPhone}">selected</c:if>>${i.deptPhone}</option>
                        </c:forEach>

                    </select>
                </div>
            </div>

            <div class="layui-form-item aaa">
                <label class="layui-form-label">所在区域城市</label>
                <div class="layui-input-block">
                    <select name="inCity" lay-filter="aihao">
                        <c:forEach items="${dept}" var="i">
                            <option value="${i.inCity}" <c:if test="${xinxi.inCity eq i.inCity}">selected</c:if>>${i.inCity}</option>
                        </c:forEach>

                    </select>
                </div>
            </div>
            <div class="layui-form-item aaa">
                <label class="layui-form-label">所属租赁分店</label>
                <div class="layui-input-block">
                    <select name="deptName" lay-filter="aihao">
                        <c:forEach items="${dept}" var="i">
                            <option value="${i.deptName}" <c:if test="${xinxi.deptName eq i.deptName}">selected</c:if>>${i.deptName}
                            </option>
                        </c:forEach>
                    </select>
                </div>
            </div>
            <div class="layui-form-item aaa">
                <label class="layui-form-label">车辆状态</label>
                <div class="layui-input-block">
                    <select name="carState" lay-filter="carState">
                        <option value="1" <c:if test="${xinxi.carState==1}">selected</c:if>>待审核</option>
                        <option value="2" <c:if test="${xinxi.carState==2}">selected</c:if>>不合格</option>
                        <option value="3" <c:if test="${xinxi.carState==3}">selected</c:if>>已报废</option>
                        <option value="4" <c:if test="${xinxi.carState==4}">selected</c:if>>已删除</option>
                        <option value="5" <c:if test="${xinxi.carState==5}">selected</c:if>>待上架</option>
                        <option value="6" <c:if test="${xinxi.carState==6}">selected</c:if>>待租赁</option>
                        <option value="7" <c:if test="${xinxi.carState==7}">selected</c:if>>自用中</option>
                        <option value="8" <c:if test="${xinxi.carState==8}">selected</c:if>>维修中</option>
                        <option value="9" <c:if test="${xinxi.carState==9}">selected</c:if>>保养中</option>
                        <option value="10" <c:if test="${xinxi.carState==10}">selected</c:if>>年检中</option>
                    </select>
                </div>
            </div>
        </div>

    </div>
    <div class="bottom">
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo" id="submit">增加</button>

            </div>
        </div>
    </div>





</form>
<script src="/static/plugins/jquery-3.2.1.min.js"></script>
<script src="/static/plugins/layui/layui.all.js"></script>
<script>
    //Demo
    layui.use(['form','laydate'], function(){
        var form = layui.form
        ,laydate=layui.laydate;
        //日期
        laydate.render({
            elem: '#test2'
        });
        laydate.render({
            elem: '#test1'
        });
        form.render('select'); //刷新select选择框渲染


    });
</script>
</body>
</html>
